using System.ComponentModel.DataAnnotations;

namespace Validation.Models {
  public enum Gender { 
    Male, Female, Others
  }


  public class Employee {
    [Required]
    public int Id { get; set; }

    [Required]
    [StringLength(64, ErrorMessage = "Name too long!")]
    public string Name { get; set; }

    [DataType(DataType.Date)]
    [Display(Name="Date of Birth")]
    public DateTime DOB { get; set; }

    [Range(1700, 1000000.99)]
    public double Salary { get; set; }
    public bool Married { get; set; }

    [DataType(DataType.EmailAddress)]
    public string  EMail { get; set; }
  }
}
